﻿using System;
using System.Collections.Generic;
using System.Data.Objects;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Iacym.Entities;

namespace Iacym.Repository
{
    public class DiscipuladoRepository : MasterRepository, IDiscipuladoRepository
    {
        public List<PERSONA> GetAllFromDiscipulado()
        {
            IQueryable<PERSONA> query = new EnumerableQuery<PERSONA>(from c in context.PERSONAs.Include("ESTADO_CIVIL").Include("UBIGEO").Include("DISCIPULADOR").Include("SEXO")
                                                                     orderby c.NroMembresia ascending
                                                                     select c);

            ObjectContext.Refresh(RefreshMode.StoreWins, query);
            return query.ToList();
        }
    }
}
